package com.auz.datagenerator.guiconnector;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JCheckBox;
import javax.swing.JFrame;

import com.auz.datagenerator.publishing.tcpip.client.StringClientPanel;

public class StringPreviewOptionPanel extends AbstractPreviewOptionPanel {

	private static final long serialVersionUID = -7491537235035908971L;
	private StringClientPanel previewPanel;

	public StringPreviewOptionPanel() {
		controlledFrame = new JFrame();
		controlledFrame.setSize(490, 250);
		previewPanel = new StringClientPanel();
		controlledFrame.add(previewPanel);
		previewPanel.run();
		controlledFrame.setVisible(true);
		
		setLayout(new FlowLayout());
		option = new JCheckBox("Preview", true);
		option.addActionListener(this);
		
		setLayout(new BorderLayout());
		add(option, BorderLayout.CENTER);
	}
	
	public void addValue(Object _value) {
		previewPanel.addValue(_value.toString());
	}

}
